SOURCES = $(shell ls *.tex)
BIB = ../bib/bib.bib

TARGET = report.pdf

$(TARGET): $(SOURCES) $(BIB)

%.dvi: %.tex
	latex $<
	-bibtex $(basename $<)
	latex $<
	latex $<

%.pdf: %.dvi
	dvipdf $<

clean:
	$(RM) *.log *.dvi *.aux $(TARGET) *.out *.bbl *.blg
